<?php if(!$lockUser):?>
	<?php $this->widget('application.extensions.fancyBox.FancyBox',
	        array(
	        'jQuery'=>false,
	        'elements'=>'#rememberPassword',
	        'frameWidth'=>550,
	        'frameHeight'=>200,
	));?>
	<div class="yiiForm">
	<?php echo CHtml::beginForm(); ?>
	
	<div style="" class="frameTitle"><a style="float:left; margin:10px 0 0 19px;" href="#"><img style="border:none;" src="/images/logo_login.jpg" alt="Madrid" title="Madrid" /></a><span class="titulo">Acceso Admin</span></div>
	
	<div id="contenido" style="width:396px; margin:0 auto; background-color: #f5f5f5; border:1px solid #374047; padding:20px;">
	
	<?php echo CHtml::errorSummary($model); ?>
	
	<span class="textos"><?php echo CHtml::activeLabel($model,'username'); ?></span>
	<span class="casilla"><?php echo CHtml::activeTextField($model,'username') ?></span>
	
	<div style="clear:both; height:0px;"></div>
	
	<span class="textos"><?php echo CHtml::activeLabel($model,'password'); ?></span>
	<span class="casilla"><?php echo CHtml::activePasswordField($model,'password') ?></span>
	
	<div style="clear:both; height:0px;"></div>
	
	<div style="" class="rememberMe" align="right">
	<?php echo CHtml::activeCheckBox($model,'rememberMe'); ?>
	<?php echo CHtml::activeLabel($model,'rememberMe'); ?>
	</div>
	
	<?php if(extension_loaded('gd') and !$allowEmpty): ?>
	<div style="clear:both; height:0px;"></div>
	
	<span class="textos"><?php echo CHtml::activeLabel($model,'verifyCode'); ?></span>
	<span class="casilla"><?php $this->widget('CCaptcha',array('buttonLabel'=>'<img src="/images/reload.gif" border=0 />')); ?><?php echo CHtml::activeTextField($model,'verifyCode'); ?></span>
	<?php endif; ?>
	
	<div id="buttonEntrar"><span class="send"><?php echo CHtml::linkButton('');?></span></div>
	<div id="buttonCancelar"><span class="cancel"><?php echo CHtml::link('',array('/site/index'));?></span></div>
	<div style="clear:both; height:0px;"></div>
	<div align="right"><?php echo CHtml::link('¿Olvidó su Contraseña?',array('rememberPassword'),array('id'=>'rememberPassword')); ?></div>
	</div>
	
	<?php echo CHtml::endForm(); ?>
	</div>
<?php else:?>
	<?php if(Yii::app()->user->hasFlash('success')):?>
	    <div class="info">
	        <?php echo Yii::app()->user->getFlash('success'); ?>
	    </div>
	<?php endif; ?>
<?php endif;?>